gtk4.git
5 years agolistitemmanager: Update selections properly
Benjamin Otte [Mon, 8 Jun 2020 16:06:01 +0000 (18:06 +0200)]
listitemmanager: Update selections properly

Replace a previous fix with a more correct one: Update the
selected state from the model instead of reusing the old state, the
model might have updated the selected state.

5 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 8 Jun 2020 15:21:58 +0000 (17:21 +0200)]
Updated Spanish translation

5 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 8 Jun 2020 14:11:28 +0000 (16:11 +0200)]
Updated Spanish translation

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 8 Jun 2020 11:15:28 +0000 (11:15 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

dropdown: Use our own CSS name

See merge request GNOME/gtk!2061

5 years agoMerge branch 'tintou/places-sidebar-cloudproviders' into 'master'
Emmanuele Bassi [Mon, 8 Jun 2020 09:35:23 +0000 (09:35 +0000)]
Merge branch 'tintou/places-sidebar-cloudproviders' into 'master'

placessidebar: Fix build with libcloudproviders

See merge request GNOME/gtk!2062

5 years agoplacessidebar: Fix build with libcloudproviders
Corentin Noël [Mon, 8 Jun 2020 08:40:46 +0000 (10:40 +0200)]
placessidebar: Fix build with libcloudproviders

Make it build with cloudproviders=true as the GtkPopover API for menus is now in GtkPopoverMenu.

Fix some leaks while looking at the code.

5 years agoMerge branch 'fix-cell-editing' into 'master'
Matthias Clasen [Sun, 7 Jun 2020 14:54:37 +0000 (14:54 +0000)]
Merge branch 'fix-cell-editing' into 'master'

Fix cell editing

Closes #2831

See merge request GNOME/gtk!2060

5 years agodropdown: Use our own CSS name
Matthias Clasen [Sun, 7 Jun 2020 13:01:20 +0000 (09:01 -0400)]
dropdown: Use our own CSS name

Use the name dropdown for the css node, and document it.

5 years agoDrop gtknativeprivate.h
Matthias Clasen [Sun, 7 Jun 2020 12:48:14 +0000 (08:48 -0400)]
Drop gtknativeprivate.h

No need to ship empty headers.

5 years agoMerge branch 'gtk-demo-tweaks' into 'master'
Matthias Clasen [Sun, 7 Jun 2020 12:51:34 +0000 (12:51 +0000)]
Merge branch 'gtk-demo-tweaks' into 'master'

Gtk demo tweaks

See merge request GNOME/gtk!2059

5 years agoFix cell editing
Matthias Clasen [Sun, 7 Jun 2020 12:43:36 +0000 (08:43 -0400)]
Fix cell editing

When translating coordinates from an event, we need to
take the surface transform into account. This makes
double-clicking on editable cells in treeviews work
again.

Fixes: #2831
5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sun, 7 Jun 2020 08:51:44 +0000 (08:51 +0000)]
Update Ukrainian translation

5 years agoUpdate POTFILES.in
Piotr Drąg [Sun, 7 Jun 2020 07:27:34 +0000 (09:27 +0200)]
Update POTFILES.in

5 years agogtk-demo: Expand the sidebar by default
Matthias Clasen [Sun, 7 Jun 2020 02:07:38 +0000 (22:07 -0400)]
gtk-demo: Expand the sidebar by default

Seems better to show what we have. Plus, clicking
those arrows is a little fiddly.

5 years agogtk-demo: Improve display of image sources
Matthias Clasen [Sun, 7 Jun 2020 02:06:58 +0000 (22:06 -0400)]
gtk-demo: Improve display of image sources

Make the images expand to fill the space.

5 years agogtk-demo: Cosmetics
Matthias Clasen [Sun, 7 Jun 2020 02:05:52 +0000 (22:05 -0400)]
gtk-demo: Cosmetics

Tweak the formatting of the descriptions of
various demos.

5 years agogtk-demo: Cosmetics
Matthias Clasen [Sun, 7 Jun 2020 01:42:07 +0000 (21:42 -0400)]
gtk-demo: Cosmetics

Make the titles of some demos match between sidebar
and window.

5 years agoMerge branch 'ebassi/for-master' into 'master'
Emmanuele Bassi [Sun, 7 Jun 2020 01:42:21 +0000 (01:42 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Annotate the GtkSelectionModel callbacks

See merge request GNOME/gtk!2057

5 years agogtk-demo: Add overline to the markup demo
Matthias Clasen [Sun, 7 Jun 2020 01:38:31 +0000 (21:38 -0400)]
gtk-demo: Add overline to the markup demo

This is a new-ish Pango feature.

5 years agoDrop pango version checks
Matthias Clasen [Sun, 7 Jun 2020 01:32:55 +0000 (21:32 -0400)]
Drop pango version checks

We are requiring pango 1.45.0 now, so no need to
Keep these ifdefs in the code any longer.

5 years agogtk-demo: Fix a leak
Matthias Clasen [Sun, 7 Jun 2020 00:09:42 +0000 (20:09 -0400)]
gtk-demo: Fix a leak

The themes demo was leaking its builder, and
therefore couldn't be closed.

5 years agogtk-demo: Cosmetic changes to the dropdown demo
Matthias Clasen [Sun, 7 Jun 2020 00:08:50 +0000 (20:08 -0400)]
gtk-demo: Cosmetic changes to the dropdown demo

Match the window title and the sidebar.

5 years agogtk-demo: Cosmetic improvements to clocks demo
Matthias Clasen [Sat, 6 Jun 2020 23:43:21 +0000 (19:43 -0400)]
gtk-demo: Cosmetic improvements to clocks demo

Reformat the code comments, and add a 10th clock.

5 years agoAnnotate the GtkSelectionModel callbacks
Emmanuele Bassi [Sat, 6 Jun 2020 23:39:33 +0000 (00:39 +0100)]
Annotate the GtkSelectionModel callbacks

We need a scope for the select and unselect callback arguments.

5 years agoUpdate Catalan translation
Jordi Mas [Sat, 6 Jun 2020 21:13:17 +0000 (23:13 +0200)]
Update Catalan translation

5 years ago3.98.5
Matthias Clasen [Sat, 6 Jun 2020 17:56:00 +0000 (13:56 -0400)]
3.98.5

5 years agoDisable a failing test
Matthias Clasen [Sat, 6 Jun 2020 19:31:29 +0000 (15:31 -0400)]
Disable a failing test

For some reason, empty-linear-gradient is failing here,
with the broadway and opengl renderers, and I don't
know why. Disable it for now.

5 years agoSkip broken a11y tests
Matthias Clasen [Sat, 6 Jun 2020 18:18:18 +0000 (14:18 -0400)]
Skip broken a11y tests

5 years agodocs: Regroup the tree support parts
Matthias Clasen [Sat, 6 Jun 2020 17:29:55 +0000 (13:29 -0400)]
docs: Regroup the tree support parts

Give the chapter a title, and put some things in sections.

5 years agodocs: Put selection models into a section
Matthias Clasen [Sat, 6 Jun 2020 17:19:07 +0000 (13:19 -0400)]
docs: Put selection models into a section

This makes the documentation structure a bit clearer.

5 years agodocs: Fix up the GtkNativeDialog section
Matthias Clasen [Sat, 6 Jun 2020 16:59:58 +0000 (12:59 -0400)]
docs: Fix up the GtkNativeDialog section

Without GtkNativeDialog in the section list,
links are not generated from the object hierarchy.

5 years agoMerge branch 'misc-multiselection' into 'master'
Matthias Clasen [Sat, 6 Jun 2020 17:54:42 +0000 (17:54 +0000)]
Merge branch 'misc-multiselection' into 'master'

Misc multiselection

See merge request GNOME/gtk!2055

5 years agoMerge branch 'list-arrows' into 'master'
Matthias Clasen [Sat, 6 Jun 2020 17:47:05 +0000 (17:47 +0000)]
Merge branch 'list-arrows' into 'master'

listbase: Make up/down arrows work

See merge request GNOME/gtk!2056

5 years agoMerge branch 'property-selection' into 'master'
Matthias Clasen [Sat, 6 Jun 2020 17:35:05 +0000 (17:35 +0000)]
Merge branch 'property-selection' into 'master'

Property selection

Closes #2826

See merge request GNOME/gtk!2054

5 years agolistbase: Make up/down arrows work
Matthias Clasen [Sat, 6 Jun 2020 16:33:12 +0000 (12:33 -0400)]
listbase: Make up/down arrows work

We were missing a binding for up/down without modifiers.

5 years agosingleselection: Clarify docs
Matthias Clasen [Sat, 6 Jun 2020 15:53:33 +0000 (11:53 -0400)]
singleselection: Clarify docs

Mention persistence and sorting.

5 years agogtk-demo: Use a property selection in the colors demo
Matthias Clasen [Sat, 6 Jun 2020 13:49:25 +0000 (09:49 -0400)]
gtk-demo: Use a property selection in the colors demo

This makes the property persist across sort changes.

5 years agoAdd GtkPropertySelection
Matthias Clasen [Sat, 6 Jun 2020 13:40:04 +0000 (09:40 -0400)]
Add GtkPropertySelection

This is a selection model that stores the selection
state in a boolean property of the items, and thus
persists across reordering and similar changes.

Fixes: #2826
5 years agoMerge branch 'listitemmanager-selection' into 'master'
Matthias Clasen [Sat, 6 Jun 2020 15:23:40 +0000 (15:23 +0000)]
Merge branch 'listitemmanager-selection' into 'master'

listitemmanager: Handle selection-changes properly

Closes #2827

See merge request GNOME/gtk!2053

5 years agomultiselection: Rewrite the select_callback implementation
Matthias Clasen [Sat, 6 Jun 2020 15:21:29 +0000 (11:21 -0400)]
multiselection: Rewrite the select_callback implementation

Use a for loop to make this more obvious, and add some
assertions that the callback is behaving properly.

5 years agoAdd tests for select_callback
Matthias Clasen [Sat, 6 Jun 2020 15:20:47 +0000 (11:20 -0400)]
Add tests for select_callback

5 years agoAdd a forgotten export
Matthias Clasen [Sat, 6 Jun 2020 15:21:05 +0000 (11:21 -0400)]
Add a forgotten export

gtk_selection_model_unselect_callback needs to be exported.

5 years agoselectionmodel: Document the callback apis
Matthias Clasen [Sat, 6 Jun 2020 14:36:09 +0000 (10:36 -0400)]
selectionmodel: Document the callback apis

5 years agoAdd a test for multiselection persistence
Matthias Clasen [Sat, 6 Jun 2020 14:23:12 +0000 (10:23 -0400)]
Add a test for multiselection persistence

Add a test that verifies that newly added items
are always unselected.

5 years agomultiselection: Clarify docs
Matthias Clasen [Sat, 6 Jun 2020 14:22:37 +0000 (10:22 -0400)]
multiselection: Clarify docs

Make it clear that GtkMultiSelection is not persistent
across resorting.

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sat, 6 Jun 2020 13:46:40 +0000 (13:46 +0000)]
Update Ukrainian translation

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Sat, 6 Jun 2020 13:44:29 +0000 (13:44 +0000)]
Update Ukrainian translation

5 years agoDrop an unnecessary include
Matthias Clasen [Sat, 6 Jun 2020 13:39:36 +0000 (09:39 -0400)]
Drop an unnecessary include

5 years agolistitemmanager: Handle selection-changes properly
Matthias Clasen [Sat, 6 Jun 2020 12:34:46 +0000 (08:34 -0400)]
listitemmanager: Handle selection-changes properly

The selection model will only emit one of items-changed
or selection-changed, so when we handle an items-changed,
we must assume that selection state may have changed for
any of the newly added items.

This fixes lingering selection state in the visible range
if you change the sorting of the colors demo.

Fixes: #2827
5 years agoUpdate POTFILES.in and POTFILES.skip
Piotr Drąg [Sat, 6 Jun 2020 12:00:43 +0000 (14:00 +0200)]
Update POTFILES.in and POTFILES.skip

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Sat, 6 Jun 2020 05:30:30 +0000 (05:30 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2052

5 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Sat, 6 Jun 2020 05:16:47 +0000 (05:16 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

multiselection: Remove unused code

See merge request GNOME/gtk!2051

5 years agolistitemwidget: Don't look at rubberbanding
Matthias Clasen [Sat, 6 Jun 2020 04:23:04 +0000 (00:23 -0400)]
listitemwidget: Don't look at rubberbanding

Move the selection changes to button release, to
avoid conflict with the drag gesture for rubberbanding.
This avoids peeking at the parent, and is generally
nicer.

Among other things, you can now shift-click to select
a range in the colors demo in gtk4-demo.

5 years agolistbase: Fix an off-by-one error
Matthias Clasen [Sat, 6 Jun 2020 04:15:50 +0000 (00:15 -0400)]
listbase: Fix an off-by-one error

We were accidentally cutting off the set one-too-early,
which showed up as single clicks not selecting an item
anymore.

5 years agolistbase: Fix a problem with rubberbands
Matthias Clasen [Sat, 6 Jun 2020 03:18:00 +0000 (23:18 -0400)]
listbase: Fix a problem with rubberbands

When I changed things to only collect the set
in the stop() function, I overlooked that this
has the side-effect of only handling items which
are backed by a widget at the time stop() is called.
If we make a big rubberband and autoscroll down too
far, we loose the items that go out the visible range
at the top. Fix that by maintaining the set as we go.

5 years agomultiselection: Don't emit nonsensical signals
Matthias Clasen [Sat, 6 Jun 2020 03:15:20 +0000 (23:15 -0400)]
multiselection: Don't emit nonsensical signals

I forgot to add a check here. We only want to emit
a ::selection-changed if we actually changed it.

5 years agomultiselection: Remove unused code
Benjamin Otte [Sat, 6 Jun 2020 03:02:37 +0000 (05:02 +0200)]
multiselection: Remove unused code

This is leftover code from an earlier SelectionModel API.

5 years agoNEWS: Updates
Matthias Clasen [Sat, 6 Jun 2020 01:35:56 +0000 (21:35 -0400)]
NEWS: Updates

5 years agogtk: Documentation fixups
Matthias Clasen [Sat, 6 Jun 2020 01:36:27 +0000 (21:36 -0400)]
gtk: Documentation fixups

Document missing symbols, and other cleanups.

5 years agogdk: Documentation fixups
Matthias Clasen [Sat, 6 Jun 2020 00:59:51 +0000 (20:59 -0400)]
gdk: Documentation fixups

Document some missing symbols.

5 years agogsk: Documentation fixups
Matthias Clasen [Sat, 6 Jun 2020 00:19:45 +0000 (20:19 -0400)]
gsk: Documentation fixups

Document a few missing symbols.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 23:55:12 +0000 (23:55 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2050

5 years agoMerge branch 'wip/ebassi/a11y-2' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 23:04:21 +0000 (23:04 +0000)]
Merge branch 'wip/ebassi/a11y-2' into 'master'

Accessibility cleanup

See merge request GNOME/gtk!2049

5 years agoNEWS: Updates
Matthias Clasen [Fri, 5 Jun 2020 22:12:30 +0000 (18:12 -0400)]
NEWS: Updates

5 years agogtk-demo: Another way to trigger theme benchmark
Matthias Clasen [Fri, 5 Jun 2020 22:39:08 +0000 (18:39 -0400)]
gtk-demo: Another way to trigger theme benchmark

The click on the headerbar seems broken atm, so add
an explicit button to trigger the cycling among the
themes.

5 years agospinbuttonaccessible: Fix an oversight
Matthias Clasen [Fri, 5 Jun 2020 21:21:26 +0000 (17:21 -0400)]
spinbuttonaccessible: Fix an oversight

We need to pass the accessible to the signal handler.

5 years agoTrivial typo fix
Matthias Clasen [Fri, 5 Jun 2020 21:08:29 +0000 (17:08 -0400)]
Trivial typo fix

5 years agoa11y: Drop GtkWidgetAccessibleClass.notify_gtk
Emmanuele Bassi [Fri, 5 Jun 2020 19:31:11 +0000 (20:31 +0100)]
a11y: Drop GtkWidgetAccessibleClass.notify_gtk

It's finally unused.

Accessible types should either watch properties they are interested in
directly, or should have (private) API to allow widgets to update the
accessible state directly.

5 years agoa11y: Simplify GtkEntryAccessible
Emmanuele Bassi [Fri, 5 Jun 2020 19:27:28 +0000 (20:27 +0100)]
a11y: Simplify GtkEntryAccessible

Now that we don't have any additional subclasses of GtkEntryAccessible
in GTK, we can drop all the conditional fluff in the base class.

We still need to subscribe to the global notify signal, because of the
sheer amount of properties watched by GtkEntryAccessible.

5 years agoa11y: Implement GtkPasswordEntryAccessible properly
Emmanuele Bassi [Fri, 5 Jun 2020 19:15:28 +0000 (20:15 +0100)]
a11y: Implement GtkPasswordEntryAccessible properly

GtkPasswordEntryAccessible is not a GtkEntryAccessible any more, so it
will need a proper implementation of various interfaces and
functionality in order to work like any other entry.

5 years agoa11y: Make GtkSearchEntryAccessible a full GtkWidgetAccessible
Emmanuele Bassi [Fri, 5 Jun 2020 18:17:31 +0000 (19:17 +0100)]
a11y: Make GtkSearchEntryAccessible a full GtkWidgetAccessible

We should not inherit from GtkEntryAccessible, given that GtkSearchEntry
is *not* a GtkEntry.

5 years agoa11y: Simplify GtkScrollbarAccessible
Emmanuele Bassi [Fri, 5 Jun 2020 14:52:53 +0000 (15:52 +0100)]
a11y: Simplify GtkScrollbarAccessible

5 years agoa11y: Simplify GtkScaleButtonAccessible
Emmanuele Bassi [Fri, 5 Jun 2020 14:35:38 +0000 (15:35 +0100)]
a11y: Simplify GtkScaleButtonAccessible

5 years agoa11y: Simplify GtkSpinButtonAccessible
Emmanuele Bassi [Fri, 5 Jun 2020 13:35:10 +0000 (14:35 +0100)]
a11y: Simplify GtkSpinButtonAccessible

We're already listening to the adjustment property on the spin button,
there's no need to reset the adjustment on widget set/unset, since the
accessible instance is always tied to the same widget.

5 years agoa11y: Simplify GtkTextAccessible
Emmanuele Bassi [Fri, 5 Jun 2020 13:15:00 +0000 (14:15 +0100)]
a11y: Simplify GtkTextAccessible

5 years agoa11y: Simplify GtkTextViewAccessible
Emmanuele Bassi [Thu, 28 May 2020 14:46:42 +0000 (15:46 +0100)]
a11y: Simplify GtkTextViewAccessible

Drop the GtkWidgetAccessible.notify_gtk override.

5 years agoa11y: Simplify GtkColorSwatchAccessible
Emmanuele Bassi [Thu, 28 May 2020 14:09:02 +0000 (15:09 +0100)]
a11y: Simplify GtkColorSwatchAccessible

Drop the GtkWidgetAccessible.notify_gtk override.

5 years agoa11y: Simplify GtkNotebookAccessible
Emmanuele Bassi [Thu, 28 May 2020 13:54:57 +0000 (14:54 +0100)]
a11y: Simplify GtkNotebookAccessible

Let the GtkNotebook explicitly update the accessible object that the
current page has changed, instead of overriding
GtkWidgetAccessible.notify_gtk.

5 years agoa11y: Simplify GtkWindowAccessible
Emmanuele Bassi [Thu, 28 May 2020 13:02:04 +0000 (14:02 +0100)]
a11y: Simplify GtkWindowAccessible

Have GtkWindow notify of title changes, instead of overriding
GtkWidgetAccessible.notify_gtk.

5 years agoa11y: Simplify GtkExpanderAccessible
Emmanuele Bassi [Wed, 27 May 2020 19:02:07 +0000 (20:02 +0100)]
a11y: Simplify GtkExpanderAccessible

Drop the GtkWidgetAccessible.notify_gtk and AtkObject.initialize
overrides, and have GtkExpander update the state of the accessible
object directly.

5 years agoa11y: Simplify GtkLevelBarAccessible
Emmanuele Bassi [Wed, 27 May 2020 18:19:55 +0000 (19:19 +0100)]
a11y: Simplify GtkLevelBarAccessible

Drop the GtkWidgetAccessible.notify_gtk and AtkObject.initialize
overrides, and have GtkLevelBar notify the accessible object of value
changes.

5 years agoa11y: Split GtkSearchEntryAccessible from GtkEntryAccessible
Emmanuele Bassi [Wed, 27 May 2020 16:54:23 +0000 (17:54 +0100)]
a11y: Split GtkSearchEntryAccessible from GtkEntryAccessible

Use a separate accessible object for the GtkSearchEntry, just like we
did for GtkPasswordEntry.

5 years agoa11y: Split password entry accessible from GtkEntryAccessible
Emmanuele Bassi [Wed, 27 May 2020 15:24:31 +0000 (16:24 +0100)]
a11y: Split password entry accessible from GtkEntryAccessible

Use a separate accessible object.

5 years agoa11y: Simplify GtkProgressBarAccessible
Emmanuele Bassi [Wed, 27 May 2020 15:04:29 +0000 (16:04 +0100)]
a11y: Simplify GtkProgressBarAccessible

Drop the GtkWidgetAccessibleClass.notify_gtk and the
AtkObjectClass.initialize overrides: they don't do anything relevant.

Instead, have GtkProgressBar update the accessible state when the
fraction changes.

5 years agoa11y: Use G_DECLARE macro for GtkWidgetAccessible
Emmanuele Bassi [Mon, 27 Apr 2020 16:57:27 +0000 (17:57 +0100)]
a11y: Use G_DECLARE macro for GtkWidgetAccessible

Allows us to drop the Private structure typedef.

5 years agoa11y: Update the accessible state when GtkIconView:model changes
Emmanuele Bassi [Mon, 27 Apr 2020 16:43:28 +0000 (17:43 +0100)]
a11y: Update the accessible state when GtkIconView:model changes

Do not use a generic "notify" signal handler.

Additionally, clean up the GtkIconViewAccessible implementation to bring
it up with modern idiomatic GObject.

5 years agoa11y: Drop notify_gtk() from GtkRangeAccessible
Emmanuele Bassi [Thu, 23 Apr 2020 19:16:31 +0000 (20:16 +0100)]
a11y: Drop notify_gtk() from GtkRangeAccessible

Let the GtkRange notify the accessible instance when the adjustment
changes.

5 years agoa11y: Drop notify_gtk() from GtkButtonAccessible
Emmanuele Bassi [Thu, 23 Apr 2020 19:08:18 +0000 (20:08 +0100)]
a11y: Drop notify_gtk() from GtkButtonAccessible

Make GtkButton notify the accessible state directly when updating the
label.

5 years agoa11y: Remove GtkToggleButtonAccessible notify_gtk implementation
Emmanuele Bassi [Thu, 23 Apr 2020 18:53:37 +0000 (19:53 +0100)]
a11y: Remove GtkToggleButtonAccessible notify_gtk implementation

The base GtkWidgetAccessible class does the right thing by default.

5 years agoa11y: Update accessible state for GtkTreeView directly
Emmanuele Bassi [Thu, 23 Apr 2020 18:26:49 +0000 (19:26 +0100)]
a11y: Update accessible state for GtkTreeView directly

Do not use GtkWidgetAccessibleClass.notify_gtk().

5 years agoNotify accessibility state changes from GtkWidget
Emmanuele Bassi [Thu, 23 Apr 2020 17:01:40 +0000 (18:01 +0100)]
Notify accessibility state changes from GtkWidget

Piggybacking on blanket GObject::notify is not very efficient.

5 years agoMove orientable style classes into GtkWidget
Emmanuele Bassi [Thu, 23 Apr 2020 16:48:29 +0000 (17:48 +0100)]
Move orientable style classes into GtkWidget

It feels slightly wrong to have GtkOrientable operate on widgets, but at
least what happens when an orientable widget changes orientation should
be part of GtkWidget.

This will allow to add more state changes without accessing widget state
from the outside of gtkwidget.c.

5 years agoNotify mapped state to the accessible object directly
Emmanuele Bassi [Wed, 22 Apr 2020 19:25:48 +0000 (20:25 +0100)]
Notify mapped state to the accessible object directly

Do not use signal connections: if we have an accessible object, notify
it directly when getting mapped and unmapped.

5 years agoDrop unused AtkRegistry path
Emmanuele Bassi [Wed, 22 Apr 2020 19:06:55 +0000 (20:06 +0100)]
Drop unused AtkRegistry path

We expect widgets to use their own derived GtkWidgetAccessible type,
these days, and given that we hard code the default accessible type of a
GtkWidget to GtkWidgetAccessible, and that we enforce the dependency of
the type passed to gtk_widget_class_set_accessible_type(), the registry
code path is clearly unused.

5 years agoMake tooltip properties idiomatic
Emmanuele Bassi [Wed, 22 Apr 2020 18:32:17 +0000 (19:32 +0100)]
Make tooltip properties idiomatic

The tooltip handling in GtkWidget is "special":

 - the string is stored inside the qdata instead of the private
   instance data
 - the accessors call g_object_set() and g_object_get(), and the
   logic is all inside the property implementation, instead of
   being the other way around
 - the getters return a copy of the string
 - the setters don't really notify all the involved properties

The GtkWidgetAccessible uses the (escaped) tooltip text as a source for
the accessible object description, which means it has to store the
tooltip inside the object qdata, and update its copy at construction and
property notification time.

We can simplify this whole circus by making the tooltip properties (text
and markup) more idiomatic:

 - notify all side-effect properties
 - return a constant string from the getter
 - if tooltip-text is set:
   - store the text as is
   - escape the markup and store it separately for the markup getter
 - if tooltip-markup is set:
   - store the markup as is
   - parse the markup and store it separately for the text getter

The part of the testtooltips interactive test that checks that the
getters are doing the right thing is now part of the gtk testsuite, so
we ensure we don't regress in behaviour.

5 years agoUse modern GObject macros for GtkAccessible
Emmanuele Bassi [Mon, 20 Apr 2020 15:47:50 +0000 (16:47 +0100)]
Use modern GObject macros for GtkAccessible

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 5 Jun 2020 19:25:46 +0000 (19:25 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2048

5 years agomultiselection: Fix the select_range implementation
Matthias Clasen [Fri, 5 Jun 2020 17:49:32 +0000 (13:49 -0400)]
multiselection: Fix the select_range implementation

When exclusive is TRUE, we would not always emit a
::selection-changed signal that covers all the items
that were unselected.

This commit includes a test.

5 years agoset: Fix gtk_set_get_max
Matthias Clasen [Fri, 5 Jun 2020 01:35:53 +0000 (21:35 -0400)]
set: Fix gtk_set_get_max

This function had an off-by-one error. Thankfully,
our selection tests are thorough enough to catch it.

5 years agodropdown: Connect a forgotten signal handler
Matthias Clasen [Fri, 5 Jun 2020 18:26:30 +0000 (14:26 -0400)]
dropdown: Connect a forgotten signal handler

The code was exporting a search_stop function, but
the ui file didn't connect it to the ::stop-search
signal. Fix that.